package com.example.springboot.controller.repeatrequestbody;

import com.example.springboot.entity.User;
import com.example.springboot.pojo.Person;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:ChenZhangKun
 * @Date: 2024/3/19 20:56
 */
@RestController
@RequestMapping("/repeat/body")
public class RepeatRequestBodyController {


    @PostMapping("/test")
    public String body(@RequestBody User user, @RequestBody Person person) {
        System.out.println(user);
        System.out.println(person);
        return "ok";
    }
}
